import { createVNode, render } from 'vue'
import css from './csa.vue'
const div = document.createElement('div')
div.setAttribute('class', 'XtxMessager')

document.body.appendChild(div)
let itmer = null
export default ({ type, text }) => {
  const valu = createVNode(css, { type, text })
  render(valu, div)
  clearTimeout(itmer)
  itmer = setTimeout(() => {
    render(null, div)
  }, 3000)
}
